script直播[直].js 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. var rule = {
  2. title: 'script直播[飞]',
  3. host: 'https://zh.superchat.live',
  4. url: '/girls/fyclass#fypage',
  5. searchUrl: '',
  6. searchable: 0,
  7. quickSearch: 0,
  8. filterable: 0,
  9. headers: {
  10. "User-Agent": "okhttp/3.11.0"
  11. },
  12. class_name: 'live',
  13. class_url: 'chinese',
  14. play_parse: true,
  15. lazy: $js.toString(() => {
  16. if (/\.(m3u8|mp4)/.test(input)) {
  17. input = {parse: 0, url: input}
  18. } else {
  19. if (rule.parse_url.startsWith('json:')) {
  20. let purl = rule.parse_url.replace('json:', '') + input;
  21. let html = request(purl);
  22. input = {parse: 0, url: JSON.parse(html).url}
  23. } else {
  24. input = rule.parse_url + input;
  25. }
  26. }
  27. }),
  28. limit: 6,
  29. 推荐: '',
  30. double: true,
  31. //一级: '.models-list-container&&.model-list-item;img&&alt;img&&src;;a&&href',
  32. 一级: $js.toString(() => {
  33. let html = request('https://zh.stripchatgirls.com/api/front/v2/models?limit=20&topLimit=2000&favoritesLimit=12&primaryTag=girls');
  34. let d = [];
  35. let blocks = JSON.parse(html).blocks;
  36. if (MY_PAGE <= blocks.length) {
  37. let list = JSON.parse(html).blocks[MY_PAGE].models;
  38. //log('长度'+blocks.length)
  39. for (let i in list) {
  40. d.push({
  41. title: list[i].username,
  42. img: list[i].previewUrlThumbBig,
  43. url: 'https://b-hls-14.doppiocdn.net/hls/' + list[i].id + '/' + list[i].id + '.m3u8' + '##' + list[i].previewUrlThumbBig + '##' + list[i].username,
  44. });
  45. }
  46. }
  47. setResult(d)
  48. }),
  49. 二级: $js.toString(() => {
  50. // log(MY_URL)
  51. let urls = [];
  52. let URL = MY_URL.split('##')[0];
  53. let PIC = MY_URL.split('##')[1];
  54. let Name = MY_URL.split('##')[2];
  55. let url = URL.split('.m3u8')[0];
  56. let list1 = ['原画', '720p', '480p', '240p'];
  57. let list = [URL, url + '_720p.m3u8', url + '_480p.m3u8', url + '_240p.m3u8'];
  58. list.forEach((it, index) => {
  59. urls.push(list1[index] + '$' + it);
  60. });
  61. //log(urls)
  62. VOD = {
  63. vod_content: URL,
  64. vod_name: Name,
  65. type_name: Name,
  66. vod_pic: PIC,
  67. vod_play_from: '直播源↓',
  68. //vod_play_url: '点击播放$' + MY_URL,
  69. vod_play_url: urls.join('#')
  70. };
  71. }),
  72. 搜索: '*',
  73. }